package com.fashop.mapper;

import java.util.ArrayList;
import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Component;

import com.fashop.bean.beacon.BeaconOut;
import com.fashop.bean.producto.ProductoOut;
import com.fashop.jpa.Beacon;
import com.fashop.jpa.Producto;

@Component("listadoBeaconMapperOut")
public class ListadoBeaconMapperOut implements GenericMapper<List<Beacon>,List<BeaconOut>>{
	
	@Resource(name = "beaconMapperOut")
	private GenericMapper<Beacon, BeaconOut> BeaconMapperOut;
		
	public List<BeaconOut> map(final List<Beacon> entrada) {
		List<BeaconOut> salida = null;
		if (entrada != null) {
			salida = new ArrayList<BeaconOut>();
			for (Beacon Beacon : entrada) {
				salida.add(BeaconMapperOut.map(Beacon));
			}
		}
		return salida;
	}

}
